import requestProxy from '@/utils/request';

const { request } = requestProxy;

// 帮助列表
export function helpList(params) {
  return request({
    url: 'admin/help/list',
    method: 'get',
    params
  });
}

// 帮助-删除
export function helpDel(id) {
  return request({
    url: `admin/help/del/${id}`,
    method: 'delete'
  });
}

// 帮助-添加文章
export function helpAdd(data) {
  return request({
    url: 'admin/help/addArticle',
    method: 'post',
    data
  });
}

// 帮助-编辑文章
export function helpEdit(id, data) {
  return request({
    url: `admin/help/editArticle/${id}`,
    method: 'put',
    data
  });
}

// 帮助-文章详情
export function helpInfo(id) {
  return request({
    url: `admin/help/info/${id}`,
    method: 'get'
  });
}

export function getNotifyList() {
  return request({
    url: 'admin/help/notify/list',
    method: 'get'
  });
}
